﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FutureApp.Media
{
    /// <summary>
    /// 文件
    /// </summary>
    [Table("Files")]
    public class File : FileBase
    {
        /// <summary>
        /// <see cref="Name"/> 的最大长度
        /// </summary>
        public const int NameMaxLength = 50;

        /// <summary>
        /// <see cref="FormerName"/> 的最大长度
        /// </summary>
        public const int FormerNameMaxLength = 50;

        /// <summary>
        /// 文件名
        /// </summary>
        [Required]
        [StringLength(NameMaxLength)]
        public string Name { get; set; }

        /// <summary>
        /// 原文件名
        /// </summary>
        [Required]
        [StringLength(FormerNameMaxLength)]
        public string FormerName { get; set; }
    }
}
